/*
 *  ***** BEGIN LICENSE BLOCK *****
 *
 *  Version: MPL 1.1
 *
 *  The contents of this file are subject to the Mozilla Public License Version
 *  1.1 (the "License"); you may not use this file except in compliance with
 *  the License. You may obtain a copy of the License at
 *  http://www.mozilla.org/MPL/
 *
 *  Software distributed under the License is distributed on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 *  for the specific language governing rights and limitations under the
 *  License.
 *
 *  The Original Code is "Zemberek Dogal Dil Isleme Kutuphanesi"
 *
 *  The Initial Developer of the Original Code is
 *  Ahmet A. Akin, Mehmet D. Akin.
 *  Portions created by the Initial Developer are Copyright (C) 2006
 *  the Initial Developer. All Rights Reserved.
 *
 *  Contributor(s):
 *
 *  ***** END LICENSE BLOCK *****
 */

package net.zemberek.yapi.obek;

import net.zemberek.yapi.Kok;

public class KelimeObekBileseni {

    final Kok kok;

    final EkKalipTipi ekKalipTipi;


    public KelimeObekBileseni(Kok kok, EkKalipTipi ekKalipTipi) {
        this.kok = kok;
        this.ekKalipTipi = ekKalipTipi;
    }

    public Kok kok() {
        return kok;
    }

    public EkKalipTipi ekKalipTipi(){
        return ekKalipTipi;
    }


    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        KelimeObekBileseni that = (KelimeObekBileseni) o;

        if (ekKalipTipi != that.ekKalipTipi) return false;
        if (kok != null ? !kok.equals(that.kok) : that.kok != null) return false;

        return true;
    }

    public int hashCode() {
        int result;
        result = (kok != null ? kok.hashCode() : 0);
        result = 31 * result + (ekKalipTipi != null ? ekKalipTipi.hashCode() : 0);
        return result;
    }
}
